package day04;

import java.util.Random;

public class xxcc {
    public static void main(String[] args) {
        useRandomNumberHandler(new RandomNumberHandler() {
            @Override
                public int getnumber() {
                    Random r=new Random();
                    int s=r.nextInt(10)+1;
                    return s;
            }
        });
    }
    public static void useRandomNumberHandler(RandomNumberHandler randomNumberHandler){
        int b=randomNumberHandler.getnumber();
        System.out.println(b);
    }
}
interface RandomNumberHandler{
        int getnumber();
}